import Vue from 'vue'
import App from './App'
var main = require("./utils/main.js");


/**
 *  组件注册
 */
import myHeader from './components/my_header.vue'
import footer from './components/my_footer.vue'
import loading from './components/loading.vue'
import ipX from './components/is_ipX.vue'
import open_setting from './components/setting/open.vue'
import login from './components/login.vue'
let arr = [
    1, 2, 3, 5, 12
]
let newArr = arr.reduce((val, item) => val + item, 0)
console.log(newArr);   //打印出来的23


let fruitList = [
    {name: "西瓜",weight: 320},
    {name: "橘子",weight: 320},
    {name: "苹果",weight: 200},
    {name: "香蕉",weight: 520}
]
let total_weight= fruitList.reduce((val, item) => val + item.weight, 0)
console.log(total_weight + "kg");   //打印出来的1360kg

Vue.component('my-header', myHeader)
Vue.component('my-footer', footer)
Vue.component('open-setting', open_setting)
Vue.component('loading', loading)
Vue.component('ipx', ipX)
Vue.component('login', login)
/**
 * 主模块注册
 */


/**
 *  租房模块
 */
// import home from './rentHouse/house/homePage/index'
// import me from './rentHouse/house/mePage/index.vue'
// import house_item from './components/house/item.vue'

// Vue.component('house-item', house_item)
/**
 *  媒体模块
 */
import mediaHome from './pages/media/homePage/index'
Vue.component('media-home', mediaHome)


Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
